home *** CD-ROM | disk | FTP | other *** search
- Path: news.ner.bbnplanet.net!forest!groy
- From: groy@forest.drew.edu (I can't think of a nickname)
- Newsgroups: comp.lang.c
- Subject: HELP with code!!!
- Message-ID: <1996Mar18.005012.137922@forest>
- Date: 18 Mar 96 00:50:12 EST
- Organization: Drew University
-
- Hello again,
-
-
- I am having serious problems with a program I am trying to write for my
- C-programming class.... (it won't compile) and for some reason I can't
- find the problem.. i have isolated the problem to a section of code but I
- can't find the error ... (It is ok for me to ask for outside help.. the
- teacher expects us to ask) So I am posting the function that contains the
- problem.. all sugestions are welcome becasue I will be up all night over
- this one... for simplicity sake assume that all variables are called
- correctly in the main and all of the calls for this function are written
- correctly...
- here it is... please answer as soon as posssible... thanks again
- Greg Roy
- groy@drew.edu
-
- void list_delete(LIST list, ACT_FPRT actfptr, CMP_FPTR cmpfptr) {
- LISTNODE *start, *end, *runner;
-
- end = start = list;
- while(end) {
- end = start->nextptr;
- while(end && (0==cmpfptr(start->dataptr, end->dataptr)))
- end = end->nextptr;
- runner = start->nextptr;
- while(runner != end) {
- start->nextptr = runner->nextptr;
- actfptr(runner->dataptr);
- ln_destroy(runner);
- runner = start->nextptr;
- } /* while(runner != end) end*/
- start = end;
- } /* while(end) end */
- } /* list_delete end */
-
-